home *** CD-ROM | disk | FTP | other *** search
/ CSi Master: Ableton Live 5 / CSi Master: Ableton Live 5.iso / pc / rsrc / locrsrc / cstshared.cst / 00012_keyCheck.ls < prev    next >
Encoding:
Text File  |  2005-07-28  |  7.1 KB  |  289 lines

  1. on keyCheck_OLD
  2.   
  3.   global gBrowserMoviePath, locatorHDaccess
  4.   
  5.   --------------------------- LOCATOR FROM HD -------------------------
  6.   if (locatorHDaccess = 1) or (locatorHDaccess = 3) then
  7.     
  8.     --  HELP BOX
  9.     --------------------
  10.     --    if the keyCode = 114 or (the commandDown and the keyCode = 44) or (the commandDown and the key = "h") then
  11.     --      global helpBox
  12.     --      if objectP(helpBox) then
  13.     --        TELL THE STAGE TO closeHelpBox
  14.     --      else
  15.     --        TELL THE STAGE TO showHelpBox
  16.     --      end if
  17.     --    end if
  18.     
  19.     --  OPEN CONTROLLER
  20.     --------------------
  21.     global hideDesk, gPrint
  22.     --    if the commandDown and the key = "o" then
  23.     --      TELL THE STAGE TO openControllerWindow
  24.     --    end if
  25.     
  26.     --  MUTE AUDIO
  27.     --------------------
  28.     if the commandDown and the key = "m" then
  29.       global gAllMute, gSavedSoundLevel
  30.       
  31.       if gAllMute = 0 then
  32.         put the soundlevel into gSavedSoundLevel
  33.         set the soundlevel = 0
  34.         set gAllMute = 1
  35.       else
  36.         set the soundlevel = gSavedSoundLevel
  37.         set gAllMute = 0
  38.       end if
  39.     end if
  40.     
  41.     -- QUIT
  42.     --------
  43.     if the commandDown and the key = "q" OR the keyCode = 53 then
  44.       -- SEND IE TO IEexit THEN TO GCbrowser
  45.       --      if gBrowserMoviePath <> 0 then
  46.       --        TELL THE STAGE 
  47.       --          if gBrowserMoviePath <> (the moviePath & the movieName) then
  48.       --            TELL THE STAGE TO exitscript
  49.       --            TELL THE STAGE TO exitscript2
  50.       --          end if
  51.       --        end tell
  52.       --      end if
  53.       ------------
  54.       openQuitBox
  55.       
  56.     end if
  57.     
  58.     --  FINDER SWITCHER
  59.     -------------------
  60.     --    if (the keyCode = 113 and the machineType <> 256) or (the commandDown and the key = ENTER and the machineType <> 256) then
  61.     --      
  62.     --      tell the stage
  63.     --        
  64.     --        if objectP(finderSwitch) then
  65.     --          finderSwitch(mDispose)
  66.     --        end if
  67.     --        
  68.     --        openXlib (the pathName & "FinderSwitcher XObj")
  69.     --        
  70.     --        put FinderSwitcher(mNew) into finderSwitch
  71.     --        if objectP(finderSwitch) then finderSwitch(mSwitchToFinder)
  72.     --        
  73.     --      end tell
  74.     --      
  75.     --    end if
  76.     
  77.     --  MUTE MUSIC
  78.     -------------------
  79.     if the commandDown and the key = "n" then
  80.       global gMute,gFade, gAllMute
  81.       if (gMute = 1) then
  82.         if gFade <> 1 and gAllMute <> 1 then
  83.           set the volume of sound (2) to 255
  84.         end if
  85.         
  86.         set gMute = 0
  87.       else
  88.         if gMute = 0 then
  89.           set the volume of sound (2) to 0
  90.           
  91.           set gMute = 1
  92.         end if
  93.       end if
  94.       updateStage
  95.     end if
  96.     
  97.     --  CLOSE LOCATOR
  98.     -------------------
  99.     if the commandDown and the key = "w" then
  100.       global gControllerWindow
  101.       if objectP(gControllerWindow) then
  102.         close gControllerWindow
  103.       end if
  104.     end if
  105.     
  106.     --  VOL DOWN
  107.     -------------------
  108.     -->> DOWN ARROW KEY
  109.     if the keyCOde = 125 then
  110.       
  111.       put the timer into vStartTime
  112.       
  113.       put the soundlevel into vLevel
  114.       
  115.       if vLevel > 0 then
  116.         set vLevel = vLevel - 1
  117.         updateStage
  118.       end if
  119.       
  120.       set the soundlevel = vLevel
  121.       
  122.       puppetSound "volume beep"
  123.       updateStage
  124.       
  125.     end if
  126.     
  127.     --  VOL UP
  128.     -------------------
  129.     -->> UP ARROW KEY
  130.     if the keyCOde = 126 then
  131.       
  132.       put the timer into vStartTime
  133.       
  134.       put the soundlevel into vLevel
  135.       if vLevel < 7 then
  136.         set vLevel = vLevel + 1
  137.         updateStage
  138.       end if
  139.       
  140.       set the soundlevel = vLevel
  141.       
  142.       puppetSound "volume beep"
  143.       updateStage
  144.       
  145.       
  146.     end if
  147.     
  148.     
  149.     ----------------------------------------------------------------------
  150.   else
  151.     
  152.     -- ORG KEY CHECK
  153.     
  154.     if the commandDown and the key = "q" OR the keyCode = 53 then
  155.       -- SEND IE TO IEexit THEN TO GCbrowser
  156.       --      if gBrowserMoviePath <> 0 then
  157.       --        TELL THE STAGE 
  158.       --          if gBrowserMoviePath <> (the moviePath & the movieName) then
  159.       --            TELL THE STAGE TO exitscript
  160.       --            TELL THE STAGE TO exitscript2
  161.       --          end if
  162.       --        end tell
  163.       --      end if
  164.       ------------
  165.       openQuitBox
  166.     end if
  167.     
  168.     -->> DOWN ARROW KEY
  169.     if the keyCOde = 125 then
  170.       
  171.       put the timer into vStartTime
  172.       
  173.       put the soundlevel into vLevel
  174.       
  175.       if vLevel > 0 then
  176.         set vLevel = vLevel - 1
  177.         updateStage
  178.       end if
  179.       
  180.       set the soundlevel = vLevel
  181.       
  182.       puppetSound "volume beep"
  183.       updateStage
  184.       
  185.     end if
  186.     
  187.     -->> UP ARROW KEY
  188.     if the keyCOde = 126 then
  189.       
  190.       put the timer into vStartTime
  191.       
  192.       put the soundlevel into vLevel
  193.       if vLevel < 7 then
  194.         set vLevel = vLevel + 1
  195.         updateStage
  196.       end if
  197.       
  198.       set the soundlevel = vLevel
  199.       
  200.       puppetSound "volume beep"
  201.       updateStage
  202.       
  203.     end if
  204.     
  205.     -- CATCH TUTORIAL (SO KEY COMANDS BELOW WON'T APPEAR)
  206.     global TutorialMovie
  207.     if TutorialMovie = 1 then
  208.       exit
  209.     end if
  210.     
  211.     if the keyCode = 114 or (the commandDown and the keyCode = 44) or (the commandDown and the key = "h") then
  212.       global helpBox
  213.       if objectP(helpBox) then
  214.         TELL THE STAGE TO closeHelpBox
  215.       else
  216.         TELL THE STAGE TO showHelpBox
  217.       end if
  218.     end if
  219.     
  220.     global hideDesk, gPrint
  221.     if the commandDown and the key = "o" then
  222.       TELL THE STAGE TO openControllerWindow
  223.     end if
  224.     
  225.     if the commandDown and the key = "m" then
  226.       global gAllMute, gSavedSoundLevel
  227.       
  228.       if gAllMute = 0 then
  229.         put the soundlevel into gSavedSoundLevel
  230.         set the soundlevel = 0
  231.         set gAllMute = 1
  232.       else
  233.         set the soundlevel = gSavedSoundLevel
  234.         set gAllMute = 0
  235.       end if
  236.     end if
  237.     
  238.     if (the keyCode = 113 and the machineType <> 256) or (the commandDown and the key = ENTER and the machineType <> 256) then
  239.       
  240.       tell the stage
  241.         
  242.         ----- TAKEN OUT BECAUSE OF OSX ERROR -----
  243.         --        if objectP(finderSwitch) then
  244.         --          finderSwitch(mDispose)
  245.         --        end if
  246.         --        
  247.         --        openXlib (the pathName & "FinderSwitcher XObj")
  248.         --        
  249.         --        put FinderSwitcher(mNew) into finderSwitch
  250.         --        if objectP(finderSwitch) then finderSwitch(mSwitchToFinder)
  251.         
  252.       end tell
  253.       
  254.     end if
  255.     
  256.     if the commandDown and the key = "n" then
  257.       global gMute,gFade, gAllMute
  258.       if (gMute = 1) then
  259.         if gFade <> 1 and gAllMute <> 1 then
  260.           set the volume of sound (2) to 255
  261.         end if
  262.         
  263.         set gMute = 0
  264.       else
  265.         if gMute = 0 then
  266.           set the volume of sound (2) to 0
  267.           
  268.           set gMute = 1
  269.         end if
  270.       end if
  271.       updateStage
  272.     end if
  273.     
  274.     if the commandDown and the key = "w" then
  275.       global gControllerWindow
  276.       if objectP(gControllerWindow) then
  277.         TELL THE STAGE TO forget gControllerWindow
  278.       end if
  279.     end if
  280.     
  281.   end if
  282.   
  283. end keyCheck
  284.  
  285.  
  286.  
  287.  
  288.  
  289.